<?php
//decode by http://奥森世纪/
namespace app\home\controller;

class Charge extends Base {
 
    public function index() {
        $member = $this->checkLogin();

        $this->assign('credit2', $member['credit2']);

        return $this->fetch(__FUNCTION__);
    }
    

    public function ajax() {
        $member = $this->checkLogin();

        $where = ['uid' => $member['uid'], 'type' => 'credit2'];
     
        //$result = $this->getPagination('Charge', 00, $where, "id DESC", "*");
        //  $result = \app\admin\model\Charge::getPagination('Charge', 00, $where, "id DESC", "*");
        /*$res = db('charge')->select();
        var_dump($res);die;*/
        $result=db('credit_record')->where($where)->order('id DESC')->paginate();

        to_json(0, '', $result);
    }

}